<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <meta name="page-help" content="https://getrebuild.com/docs/admin/users" />
    <title>[[${bundle.L('用户管理')}]]</title>
    <style>
      .badge.badge-WW,
      .badge.badge-DD,
      .badge.badge-FS {
        font-weight: normal;
        cursor: help;
        border-radius: 12px;
        padding: 0 6px;
        border-color: #4873c0;
        color: #4873c0;
      }
      .badge.badge-DD {
        border-color: #38adff;
        color: #38adff;
      }
      .badge.badge-FS {
        border-color: #3370ff;
        color: #3370ff;
      }
      .ufilters {
        display: inline-block;
        margin-top: 8px;
        padding: 2px 0;
      }
    </style>
  </head>
  <body>
    <div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo rb-aside rb-color-header" th:classappend="${sideCollapsedClazz}">
      <th:block th:replace="~{/_include/nav-top}" />
      <th:block th:replace="~{/_include/nav-left-admin(active='users')}" />
      <div class="rb-content">
        <aside class="page-aside">
          <div class="rb-scroller">
            <div class="page-aside-tree" id="dept-tree">
              <div class="ph-item rb">
                <div class="ph-col-12 p-0">
                  <div class="ph-row">
                    <div class="ph-col-12 big"></div>
                    <div class="ph-col-12 big"></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </aside>
        <div class="main-content container-fluid">
          <ul class="nav nav-tabs nav-tabs-classic">
            <li class="nav-item">
              <a href="users" class="nav-link active"><span class="icon mdi mdi-account"></span> [[${bundle.L('用户')}]]</a>
            </li>
            <li class="nav-item">
              <a href="departments" class="nav-link"><span class="icon mdi mdi-account-multiple"></span> [[${bundle.L('部门')}]]</a>
            </li>
          </ul>
          <div class="card card-table">
            <div class="card-body">
              <div class="dataTables_wrapper container-fluid">
                <div class="row rb-datatable-header">
                  <div class="col-12 col-lg-5">
                    <div class="dataTables_filter">
                      <div class="input-group input-search float-left">
                        <input class="form-control" type="text" th:placeholder="${bundle.L('快速查询')}" />
                        <span class="input-group-btn">
                          <button class="btn btn-secondary" type="button"><i class="icon zmdi zmdi-search"></i></button>
                        </span>
                      </div>
                      <div class="float-left ml-2">
                        <a class="ufilters" href="###filters" data-toggle="dropdown">
                          <i class="icon mdi mdi-account-filter fs-15"></i>
                          <span>[[${bundle.L('全部用户')}]]</span>
                        </a>
                        <div class="dropdown-menu">
                          <a class="dropdown-item" data-filter="0">[[${bundle.L('全部用户')}]]</a>
                          <a class="dropdown-item" data-filter="1">[[${bundle.L('可用用户')}]]</a>
                          <a class="dropdown-item" data-filter="2">[[${bundle.L('未激活的')}]]</a>
                          <a class="dropdown-item" data-filter="3">[[${bundle.L('已禁用的')}]]</a>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="col-12 col-lg-7">
                    <div class="dataTables_oper">
                      <button class="btn btn-space btn-secondary J_view" type="button" disabled="disabled"><i class="icon mdi mdi-folder-open"></i> [[${bundle.L('打开')}]]</button>
                      <div class="btn-group btn-space">
                        <button class="btn btn-primary J_new" type="button"><i class="icon mdi mdi-account-plus"></i> [[${bundle.L('新建用户')}]]</button>
                        <button class="btn btn-primary dropdown-toggle w-auto" type="button" data-toggle="dropdown"><span class="icon zmdi zmdi-chevron-down"></span></button>
                        <div class="dropdown-menu dropdown-menu-primary dropdown-menu-right">
                          <a class="dropdown-item J_new-dept"><i class="icon mdi mdi-account-multiple-plus"></i> [[${bundle.L('新建部门')}]]</a>
                        </div>
                      </div>
                      <div class="btn-group btn-space">
                        <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">[[${bundle.L('更多')}]] <i class="icon zmdi zmdi-more-vert"></i></button>
                        <div class="dropdown-menu dropdown-menu-right">
                          <a class="dropdown-item J_imports"><i class="icon mdi mdi-account-arrow-left"></i> [[${bundle.L('导入用户')}]]</a>
                          <a class="dropdown-item J_resign"><i class="icon mdi mdi-account-switch-outline"></i> [[${bundle.L('离职继任')}]] <sup class="rbv"></sup></a>
                          <a class="dropdown-item J_batch2"><i class="icon mdi mdi-playlist-edit"></i> [[${bundle.L('批量操作')}]] <sup class="rbv"></sup></a>
                          <a class="dropdown-item J_delete2"><i class="icon zmdi zmdi-delete"></i> [[${bundle.L('批量删除')}]] <sup class="rbv"></sup></a>
                          <div class="dropdown-divider"></div>
                          <a class="dropdown-item J_columns"><i class="icon mdi mdi-view-column-outline"></i> [[${bundle.L('列显示')}]]</a>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div id="react-list" class="rb-loading rb-loading-active data-list">
                  <th:block th:replace="~{/_include/spinner}" />
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script>
      window.__PageConfig = {
        type: 'RecordList',
        entity: ['[[${entityName}]]', '[[${entityLabel}]]', '[[${entityIcon}]]'],
        privileges: [(${entityPrivileges})],
        listConfig: [(${DataListConfig})],
        advFilter: false,
        serviceMail: '[[${serviceMail}]]',
      }
    </script>
    <th:block th:replace="~{/_include/forms}" />
    <script th:src="@{/assets/js/general/rb-datalist.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/bizuser/dept-tree.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/bizuser/user-list.js}" type="text/babel"></script>
  </body>
</html>
